package com.imooc.bilibili.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.imooc.bilibili.domain.user.UserMoment;
import org.apache.rocketmq.client.exception.MQBrokerException;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.remoting.exception.RemotingException;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * 用户动态Service
 *
 * @author gcq
 * @Create 2022-05-29
 */
public interface UserMomentsService extends IService<UserMoment> {
    /**
     * 新建用户动态
     *
     * @param userMoment 用户动态内容
     * @return 结果
     */
    Integer addUserMoments(UserMoment userMoment) throws MQBrokerException, RemotingException, InterruptedException, MQClientException, UnsupportedEncodingException;

    /**
     * 查询订阅状态
     *
     * @param userId
     * @return
     */
    List<UserMoment> getUserSubscribedMoments(Long userId);
}
